package com.vercon.otamirror.listener;

import android.view.View;

public abstract class OnMultiClickListener implements View.OnClickListener{

    private final int MIN_CLICK_DELAY_TIME = 1000;
    private long lastClcikTime;

    public abstract void onMultiClick(View v);

    @Override
    public void onClick(View v) {
        long curClickTime = System.currentTimeMillis();
        if((curClickTime - lastClcikTime) >= MIN_CLICK_DELAY_TIME){
            lastClcikTime = curClickTime;
            onMultiClick(v);
        }
    }
}
